Fix trying to document build scripts
authorAlex Crichton <alex@alexcrichton.com>
Mon, 23 Mar 2015 18:33:22 +0000 (11:33 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 23 Mar 2015 18:33:22 +0000 (11:33 -0700)
src/cargo/core/manifest.rs
tests/test_cargo_compile_custom_build.rs

index 983985fc1f06590cb55a285b272d9cd6c9102f9e..f572e62964581e461ad2e4ba2ccf16a8865d7e90 100644 (file)
@@ -237,7 +237,7 @@ impl Target {
             name: String::new(),
             src_path: PathBuf::new(""),
             metadata: None,
-            doc: true,
+            doc: false,
             doctest: false,
             harness: true,
             for_host: false,
@@ -255,6 +255,7 @@ impl Target {
             src_path: src_path.to_path_buf(),
             metadata: Some(metadata),
             doctest: true,
+            doc: true,
             ..Target::blank()
         }
     }
@@ -266,6 +267,7 @@ impl Target {
             name: name.to_string(),
             src_path: src_path.to_path_buf(),
             metadata: metadata,
+            doc: true,
             ..Target::blank()
         }
     }
index 3bea9644b6bc993c79f75f6a6807cec6f14f3846..58645c54f448bcdda2c4098c22a46330c3a275e1 100644 (file)
@@ -469,6 +469,7 @@ test!(testing_and_such {
             fn main() {}
         "#);
 
+    println!("build");
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(0));
     p.root().move_into_the_past().unwrap();
@@ -476,6 +477,7 @@ test!(testing_and_such {
     File::create(&p.root().join("src/lib.rs")).unwrap();
     p.root().move_into_the_past().unwrap();
 
+    println!("test");
     assert_that(p.cargo("test").arg("-vj1"),
                 execs().with_status(0)
                        .with_stdout(format!("\
@@ -498,16 +500,17 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
 ", compiling = COMPILING, running = RUNNING, doctest = DOCTEST).as_slice()));
 
+    println!("doc");
     assert_that(p.cargo("doc").arg("-v"),
                 execs().with_status(0)
                        .with_stdout(format!("\
 {compiling} foo v0.5.0 (file://[..])
 {running} `rustdoc [..]`
-{running} `rustc [..]`
 ", compiling = COMPILING, running = RUNNING).as_slice()));
 
     File::create(&p.root().join("src/main.rs")).unwrap()
          .write_all(b"fn main() {}").unwrap();
+    println!("run");
     assert_that(p.cargo("run"),
                 execs().with_status(0)
                        .with_stdout(format!("\